// D:\桌面\实习\code1\boot\backed_hero\src\main\java\com\geek\hero\vo\Result.java

package com.geek.hero.vo;

import java.util.HashMap;
import java.util.Map;

public class Result {
    private boolean flag;
    private Object data;
    private String msg;

    public static Result success(Object data, String msg) {
        Result result = new Result();
        result.flag = true;
        result.data = data;
        result.msg = msg;
        return result;
    }

    public static Result fail(String msg) {
        Result result = new Result();
        result.flag = false;
        result.msg = msg;
        return result;
    }

    // getter/setter
    public boolean isFlag() { return flag; }
    public void setFlag(boolean flag) { this.flag = flag; }
    public Object getData() { return data; }
    public void setData(Object data) { this.data = data; }
    public String getMsg() { return msg; }
    public void setMsg(String msg) { this.msg = msg; }
}
